package com.gxc.healthfood.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 食物信息实体类
 * @TableName foods
 */
@TableName(value ="foods")
@Data
public class Foods implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 食物名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 分类ID
     */
    @TableField(value = "category_id")
    private Integer categoryId;

    /**
     * 食物描述
     */
    @TableField(value = "description")
    private String description;

    /**
     * 份量规格
     */
    @TableField(value = "serving_size")
    private String servingSize;

    /**
     * 可食部百分比
     */
    @TableField(value = "edible_percentage")
    private BigDecimal ediblePercentage;

    /**
     * 图片URL
     */
    @TableField(value = "image_url")
    private String imageUrl;

    /**
     * 是否是常见食材
     */
    @TableField(value = "is_common")
    private Integer isCommon;

    /**
     * 数据来源: SYSTEM/USER
     */
    @TableField(value = "source")
    private String source;

    /**
     * 创建者ID
     */
    @TableField(value = "created_by")
    private Long createdBy;

    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    private Date createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at")
    private Date updatedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}